#{extends 'mana-main.html'/}
#{set photoManageActive :"active" /}
#{set title:"图片管理"/}
<style type="text/css">
    .td{
        text-align: center!important;
    }
</style>
#{set 'moreScripts'}
<link href="@{'/public/stylesheets/photo.css'}" rel="stylesheet">
#{/set}
<br>
<br>
<br>
<br>
<br>
    <div class="row-fluid">
        <div class="span3">
            <div class="well sidebar-nav white">
                <ul class="nav nav-list">
                    <li class="nav-header">图片设置</li>
                    <li><a href="@{Photos.addPhoto()}">添加图片</a></li>
                    <li><a href="#">管理图片</a></li>
                </ul>
            </div>
        </div><div class="span9">

    </div><table class="table table-bordered white">
        <tbody><tr>
            <th>预览</th>
            <th>图片id</th>
            <th width="15%">删除</th>
        </tr>

        #{if photoList}
        #{list items: photoList,as :'photo'}
        <tr>
            <td class="td">
                <img src="${photo.getPhoto()}" alt="0" class="tableimg"  width="200px"/>
            </td>
            <td>${photo.id}</td>
            <td class="td">
                <a class="btn btn-danger" href="@{Photos.delPhoto(photo.name,photo.id)}">删除</a>
            </td>
        </tr>
        #{/list}
        #{/if}


        </tbody></table>
    #{page pageBean: pageBean, params : params/}

    </div>
